﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint;

namespace RSM.Business
{
   public static class Connectionreader
    {
        public static string GetDataBaseConnectionString()
        {
            string dataBaseConnectionString = string.Empty;

            using (SPSite site = new SPSite(SPContext.Current.Site.Url))
            {
                Microsoft.SharePoint.Administration.SPContentDatabase db = site.ContentDatabase;
                dataBaseConnectionString = db.DatabaseConnectionString;
            }
            return dataBaseConnectionString;
        }
    }
}
